Using impurity to create declarative interfaces in Mercury
نویسندگان
چکیده
The logi /fun tional language Mer ury allows the programmer to annotate predi ates and fun tions to mark impure predi ates, allowing impure ode to be safely integrated into a de larative language. By using purity de larations with the foreign language interfa e, programmers an take advantage of many of the features of a high level programming language while writing imperative ode to interfa e with existing imperative libraries. This paper outlines the purity system in Mer ury and how it a e ts operational semanti s, ompares this purity system with other approa hes to de laring impurity in a pure language, and gives an extended example of how impurity and foreign language interfa es an work together to simplify the hore of writing de larative interfa es to libraries.
منابع مشابه
MCORBA: A CORBA Binding for Mercury
MCORBA is a binding to the CORBA distributed object framework for the purely declarative logic/functional language Mercury. The binding preserves the referential transparency of the language, and has several advantages over similar bindings for other strongly typed declarative languages. As far as we know, it is the rst such binding to be bidirectional; it allows a Mercury program both to opera...
متن کاملThe structural and density state calculation of B Nitrogen doped silicene nano flake
In this paper, we study the effect of single Boron/Nitrogen impurityatom on electronic properties of a silicene nano flake. Our calculations are basedon density functional theory by using Gaussian package. Here, one Si atom insilicene nano flake substitutes with a Boron/Nitrogen atom. The results show thatsubstitution of one Si atom with single Boron/Nitrogen atom increases distanceof impurity ...
متن کاملXXL: A Visual+Textual Environment for Building Graphical User Interfaces
This paper presents XXL, a visual+textual environment for the automated building of graphical user interfaces. This system uses a declarative language which is a subset of the C language and can either be interpreted or compiled. It includes an interactive builder that can both handle graphical and non-graphical objects. This tool makes it possible to create highly customized interfaces by visu...
متن کاملHypertext Interfaces for Chinese Character and Word Dictionaries 字库词库超文本界面
For the same dictionary, different interfaces can be designed for different kinds of users. Interface designers and developers should thus be equipped with a tool that allow them to quickly design and test those interfaces. In this paper, I consider a chinese-english character and word dictionary which is stored in a relational database. The dictionary interface is a hypertext composed of nodes...
متن کاملInductive Mercury Programming
We investigate using the Mercury language to implement and design ILP algorithms, presenting our own ILP system IMP. Mercury provides faster execution than Prolog. Since Mercury is a purely declarative language, run-time assertion of induced clauses is prohibited. Instead IMP uses a problem-specific interpreter of ground representations of induced clauses. The interpreter is used both for cover...
متن کامل